package com.lesson10.composite;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/8/31 16:50
 */
public class Client
{
    public static void main(String[] args)
    {
        OragizationComposite u = new University("清华大学", "中国最好");
        OragizationComposite c1 = new Collect("计算机学院","计算机学院");
        OragizationComposite c2 = new Collect("计算机学院","工程学院");

        c1.add(new Department("软件工程","软件工程"));
        c1.add(new Department("网络工程","网络工程"));

        c2.add(new Department("软件工程","软件工程c2"));
        c2.add(new Department("网络工程","网络工程c2"));

        u.add(c1);
        u.add(c2);

        u.print();
    }
}
